<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let time = prompt('请输入秒数:')
    function getTime(t) {
      h = parseInt(t / 60 / 60 % 24)
      m = parseInt(t / 60 % 60)
      s = parseInt(t % 60)
      h = h > 10 ? h : '0' + h
      m = m > 10 ? m : '0' + m
      s = s > 10 ? s : '0' + s
      // console.log(h, m, s);
      return `计算后秒数为${h}小时${m}分${s}秒`
    }
    let re = getTime(time)
    document.write(re)
  </script>
</body>

</html>